<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Inter Data Types</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.12.4.min.js"
	integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>

<script src="../docs-assets/Bigfoot.js"></script>
<link href="../docs-assets/Bigfoot.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Inter Data Types' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">bytecode</a></li><li><a href="index.html#3">Chapter 3: Their Instructions</a></li><li><b>Inter Data Types</b></li></ul></div>
<p class="purpose">A primitive notion of data type, below the level of kinds.</p>

<ul class="toc"><li><a href="3-idt.html#SP1">&#167;1. Constructors</a></li><li><a href="3-idt.html#SP7">&#167;7. Simple types and type names</a></li><li><a href="3-idt.html#SP14">&#167;14. Converting inter_type to TID</a></li><li><a href="3-idt.html#SP15">&#167;15. Converting TID to inter_type</a></li><li><a href="3-idt.html#SP16">&#167;16. Parsing from text</a></li><li><a href="3-idt.html#SP20">&#167;20. Writing to text</a></li><li><a href="3-idt.html#SP22">&#167;22. Typechecking</a></li><li><a href="3-idt.html#SP24">&#167;24. The type of a defined symbol</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Constructors.</b>Abstractly, an Inter type is a combination of a "constructor" and 0 or more
"operand types", the number depending on which constructor is used. If this
is 0, type is a "base" constructor.
</p>

<p class="commentary">Constructors are identified textually by keywords, such as <span class="extract"><span class="extract-syntax">int32</span></span>, and also
by "constructor ID" numbers, such as <span class="extract"><span class="extract-syntax">INT32_ITCONC</span></span>. This one is a base;
whereas <span class="extract"><span class="extract-syntax">list</span></span>, for example, is not &mdash; <span class="extract"><span class="extract-syntax">list of int32</span></span> is a valid type, with
1 type operand, but <span class="extract"><span class="extract-syntax">list</span></span> alone is not sufficient to specify a type.
</p>

<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>These are the constructor IDs. Note that changing any of these values would
invalidate existing Inter binary files, necessitating a bump of <a href="1-tiv.html" class="internal">The Inter Version</a>.
</p>

<pre class="definitions code-font"><span class="definition-keyword">enum</span> <span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INT32_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INT16_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INT8_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">INT2_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">REAL_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">TEXT_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">ENUM_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">LIST_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">ACTIVITY_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">COLUMN_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">TABLE_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">FUNCTION_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">STRUCT_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">RELATION_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">DESCRIPTION_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">RULE_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">RULEBOOK_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">EQUATED_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">UNARY_COV_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">UNARY_CON_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">BINARY_COV_COV_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">BINARY_COV_CON_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">BINARY_CON_COV_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">BINARY_CON_CON_ITCONC</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">VOID_ITCONC</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">MIN_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax"> </span><span class="constant-syntax">UNCHECKED_ITCONC</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">MAX_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax"> </span><span class="constant-syntax">VOID_ITCONC</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::is_valid_constructor_code</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></span>:<br/><a href="3-idt.html#SP5">&#167;5</a>, <a href="3-idt.html#SP6">&#167;6</a>, <a href="3-idt.html#SP10">&#167;10</a>, <a href="3-idt.html#SP14">&#167;14</a><br/>Verifying Inter - <a href="3-vi.html#SP5">&#167;5</a>, <a href="3-vi.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">constructor</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">constructor</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">MIN_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">constructor</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">MAX_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Clearly we need to store some metadata about what these constructor IDs
mean, and we do that with a simple lookup array large enough to hold all
valid constructor codes as indexes:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">constructor_ID</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">constructor_keyword</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">min_value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">max_value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">is_enumerated</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">is_base</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax">;</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> </span><span class="identifier-syntax">inter_type_constructors</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax"> + </span><span class="constant-syntax">1</span><span class="plain-syntax">];</span>
</pre>
<ul class="endnotetexts"><li>The structure inter_type_constructor is accessed in 4/ttc and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>That array initially contains undetermined data, of course, so we need to
initialise it:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::initialise_constructors</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">InterTypes::initialise_constructors</span></span>:<br/>Bytecode Module - <a href="1-bm.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">,   </span><span class="identifier-syntax">I</span><span class="string-syntax">"unchecked"</span><span class="plain-syntax">,   -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">INT32_ITCONC</span><span class="plain-syntax">,       </span><span class="identifier-syntax">I</span><span class="string-syntax">"int32"</span><span class="plain-syntax">,       -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">INT16_ITCONC</span><span class="plain-syntax">,       </span><span class="identifier-syntax">I</span><span class="string-syntax">"int16"</span><span class="plain-syntax">,            -32768,      </span><span class="constant-syntax">32767</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">INT8_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"int8"</span><span class="plain-syntax">,               -128,        </span><span class="constant-syntax">127</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">INT2_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"int2"</span><span class="plain-syntax">,                  </span><span class="constant-syntax">0</span><span class="plain-syntax">,          </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">REAL_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"real"</span><span class="plain-syntax">,        -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">TEXT_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"text"</span><span class="plain-syntax">,        -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">ENUM_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"enum"</span><span class="plain-syntax">,        -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">LIST_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"list"</span><span class="plain-syntax">,        -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">ACTIVITY_ITCONC</span><span class="plain-syntax">,    </span><span class="identifier-syntax">I</span><span class="string-syntax">"activity"</span><span class="plain-syntax">,    -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">COLUMN_ITCONC</span><span class="plain-syntax">,      </span><span class="identifier-syntax">I</span><span class="string-syntax">"column"</span><span class="plain-syntax">,      -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">TABLE_ITCONC</span><span class="plain-syntax">,       </span><span class="identifier-syntax">I</span><span class="string-syntax">"table"</span><span class="plain-syntax">,       -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">FUNCTION_ITCONC</span><span class="plain-syntax">,    </span><span class="identifier-syntax">I</span><span class="string-syntax">"function"</span><span class="plain-syntax">,    -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">STRUCT_ITCONC</span><span class="plain-syntax">,      </span><span class="identifier-syntax">I</span><span class="string-syntax">"struct"</span><span class="plain-syntax">,      -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">RELATION_ITCONC</span><span class="plain-syntax">,    </span><span class="identifier-syntax">I</span><span class="string-syntax">"relation"</span><span class="plain-syntax">,    -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">DESCRIPTION_ITCONC</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"description"</span><span class="plain-syntax">, -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">RULE_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"rule"</span><span class="plain-syntax">,        -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">RULEBOOK_ITCONC</span><span class="plain-syntax">,    </span><span class="identifier-syntax">I</span><span class="string-syntax">"rulebook"</span><span class="plain-syntax">,    -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">EQUATED_ITCONC</span><span class="plain-syntax">,     </span><span class="identifier-syntax">I</span><span class="string-syntax">""</span><span class="plain-syntax">,            -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">UNARY_COV_ITCONC</span><span class="plain-syntax">,   </span><span class="identifier-syntax">I</span><span class="string-syntax">"unary-cov"</span><span class="plain-syntax">,   -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">UNARY_CON_ITCONC</span><span class="plain-syntax">,   </span><span class="identifier-syntax">I</span><span class="string-syntax">"unary-con"</span><span class="plain-syntax">,   -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">BINARY_COV_COV_ITCONC</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"binary-cov-cov"</span><span class="plain-syntax">, -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">BINARY_COV_CON_ITCONC</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"binary-cov-con"</span><span class="plain-syntax">, -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">BINARY_CON_COV_ITCONC</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"binary-con-cov"</span><span class="plain-syntax">, -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">BINARY_CON_CON_ITCONC</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"binary-con-con"</span><span class="plain-syntax">, -2147483648, </span><span class="constant-syntax">2147483647</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP5" class="function-link"><span class="function-syntax">InterTypes::init_con</span></a><span class="plain-syntax">(</span><span class="constant-syntax">VOID_ITCONC</span><span class="plain-syntax">,        </span><span class="identifier-syntax">I</span><span class="string-syntax">"void"</span><span class="plain-syntax">,                  </span><span class="constant-syntax">1</span><span class="plain-syntax">,          </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,  </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>Where:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::init_con</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">InterTypes::init_con</span></span>:<br/><a href="3-idt.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">ID</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">range_from</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">range_to</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">en</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">base</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ID</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"constructor ID out of range"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">IDT</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">inter_type_constructors</span><span class="plain-syntax">[</span><span class="identifier-syntax">ID</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ID</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_keyword</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::duplicate</span><span class="plain-syntax">(</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">min_value</span><span class="plain-syntax"> = </span><span class="identifier-syntax">range_from</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">max_value</span><span class="plain-syntax"> = </span><span class="identifier-syntax">range_to</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_enumerated</span><span class="plain-syntax"> = </span><span class="identifier-syntax">en</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_base</span><span class="plain-syntax"> = </span><span class="identifier-syntax">base</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> = </span><span class="identifier-syntax">arity</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">IDT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>Assuming that has been done, it is safe to call these lookup functions. Note
that it's fine for textual lookups to be relatively slow.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::constructor_from_ID</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">InterTypes::constructor_from_ID</span></span>:<br/><a href="3-idt.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">ID</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ID</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> &amp;(</span><span class="identifier-syntax">inter_type_constructors</span><span class="plain-syntax">[</span><span class="identifier-syntax">ID</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::constructor_from_name</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">InterTypes::constructor_from_name</span></span>:<br/><a href="3-idt.html#SP18_11">&#167;18.11</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">ID</span><span class="plain-syntax"> = </span><span class="constant-syntax">MIN_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax">; </span><span class="identifier-syntax">ID</span><span class="plain-syntax"> &lt;= </span><span class="constant-syntax">MAX_INTER_TYPE_CONSTRUCTOR</span><span class="plain-syntax">; </span><span class="identifier-syntax">ID</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = &amp;(</span><span class="identifier-syntax">inter_type_constructors</span><span class="plain-syntax">[</span><span class="identifier-syntax">ID</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_keyword</span><span class="plain-syntax">, </span><span class="identifier-syntax">name</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">itc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. Simple types and type names.</b>We need to represent types very economically in terms of memory. In principle,
the set of abstract types is infinite (consider for example <span class="extract"><span class="extract-syntax">int32</span></span>, <span class="extract"><span class="extract-syntax">list of int32</span></span>,
<span class="extract"><span class="extract-syntax">list of list of int32</span></span>, ...), so there is no limit to the memory which might
be required.
</p>

<p class="commentary">We use the following representations, starting with the most concise:
</p>

<ul class="items"><li>(1) A "TID", or type ID, is a single <span class="extract"><span class="extract-syntax">inter_ti</span></span> value, often stored as a field
in the bytecode for some instruction. For example, a <span class="extract"><span class="extract-syntax">VARIABLE_IST</span></span> instruction
includes a field holding the TID of its variable's type. This can only represent
simple descriptions (see below), and you need to know what package a TID
came from (i.e., what symbols table was in use there) to unravel it.
</li><li>(2) An <a href="3-idt.html#SP9" class="internal">inter_type</a> is a lightweight structure intended for passing around
the functions in this section. It can also only represent simple descriptions &mdash; in
fact, TIDs and <span class="extract"><span class="extract-syntax">inter_type</span></span>s can faithfully be converted back and forth &mdash; but
has the advantage that you don't need any package context to understand it.
Arguably this should be called <span class="extract"><span class="extract-syntax">inter_simple_type_description</span></span>, but this is the
one we use most often, so brevity is good.
</li><li>(3) An <a href="3-idt.html#SP16" class="internal">inter_semisimple_type_description</a> is a much larger structure used only
when parsing Inter code from text &mdash; so in a regular Inform 7 compilation run, no
such structures will ever exist. This is still limited, but to the larger
set of semi-simple type descriptions.
</li></ul>
<p class="commentary">The following definitions look circular, but are not:<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>
</p>

<ul class="items"><li>&#9679; A "simple type description" is either a constructor for which all type
operands are <span class="extract"><span class="extract-syntax">unchecked</span></span>, such as <span class="extract"><span class="extract-syntax">int32</span></span> or <span class="extract"><span class="extract-syntax">list of unchecked</span></span>, or else a
"type name".
</li><li>&#9679; A "semi-simple type description" is either a constructor for which all
type operands are simple, or else a "type name".
</li><li>&#9679; A "type name" is a name defined with a specific semi-simple type description.
</li></ul>
<ul class="footnotetexts"><li class="footnote" id="fn:1"><p class="inwebfootnote"><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> Because the hierarchy of definitions of type names must be well-founded.
You cannot define <span class="extract"><span class="extract-syntax">K_apple</span></span> to equal <span class="extract"><span class="extract-syntax">K_pear</span></span> and vice versa. Each type name
must be defined in terms of a finite number of simple types, once all type
name substitution has been performed, and no type name can ever lead back to
itself.
<a href="#fnref:1" title="return to text"> &#x21A9;</a></p></li></ul>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>By using type names we can (indirectly) represent any abstract type using
any of the representations above. For example, <span class="extract"><span class="extract-syntax">list of list of int32</span></span> is neither
simple nor semi-simple, but we can get to it by:
</p>

<ul class="items"><li>(1) Defining <span class="extract"><span class="extract-syntax">K_list_of_int32</span></span> as a type name for <span class="extract"><span class="extract-syntax">list of int32</span></span>, which is
semi-simple.
</li><li>(2) Defining <span class="extract"><span class="extract-syntax">K_list_of_list_of_int32</span></span> as a type name for <span class="extract"><span class="extract-syntax">list of K_list_of_int32</span></span>,
which is semi-simple.
</li></ul>
<p class="commentary">And we now have <span class="extract"><span class="extract-syntax">K_list_of_list_of_int32</span></span>, which is simple since it is a bare
type name, and so can be stored in an <a href="3-idt.html#SP9" class="internal">inter_type</a> or a TID.
</p>

<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>So, then, this holds any simple type description:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">underlying_constructor</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure inter_type is accessed in 3/iitf and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b>Since there are two possibilities, there are two functions to construct these:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::from_constructor_code</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">InterTypes::from_constructor_code</span></span>:<br/><a href="3-idt.html#SP12">&#167;12</a>, <a href="3-idt.html#SP14">&#167;14</a>, <a href="3-idt.html#SP18_8">&#167;18.8</a>, <a href="3-idt.html#SP19">&#167;19</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">constructor_code</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">constructor_code</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"invalid constructor code"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">underlying_constructor</span><span class="plain-syntax"> = </span><span class="identifier-syntax">constructor_code</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::from_type_name</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">InterTypes::from_type_name</span></span>:<br/><a href="3-idt.html#SP14">&#167;14</a>, <a href="3-idt.html#SP18_12">&#167;18.12</a>, <a href="3-idt.html#SP20">&#167;20</a><br/>The Instance Construct - <a href="4-tic2.html#SP3">&#167;3</a><br/>The Permission Construct - <a href="4-tpc3.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a>, <a href="4-ttc.html#SP4">&#167;4</a>, <a href="4-ttc.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">underlying_constructor</span><span class="plain-syntax"> = </span><a href="4-ttc.html#SP7" class="function-link"><span class="function-syntax">TypenameInstruction::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">S</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. </b>Reading those back:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::type_name</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">InterTypes::type_name</span></span>:<br/><a href="3-idt.html#SP13">&#167;13</a><br/>The Instance Construct - <a href="4-tic2.html#SP4">&#167;4</a>, <a href="4-tic2.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::constructor</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">InterTypes::constructor</span></span>:<br/><a href="3-idt.html#SP13">&#167;13</a>, <a href="3-idt.html#SP21">&#167;21</a>, <a href="3-idt.html#SP22">&#167;22</a>, <a href="3-idt.html#SP23">&#167;23</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP6" class="function-link"><span class="function-syntax">InterTypes::constructor_from_ID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">underlying_constructor</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP6" class="function-link"><span class="function-syntax">InterTypes::constructor_from_ID</span></a><span class="plain-syntax">(</span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">itc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::constructor_code</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">InterTypes::constructor_code</span></span>:<br/><a href="3-idt.html#SP12">&#167;12</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">)-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. </b>In some ways the most useful simple type is <span class="extract"><span class="extract-syntax">unchecked</span></span>. This declares that
all type-checking rules are waived for the data being described. A program
in which all data is <span class="extract"><span class="extract-syntax">unchecked</span></span> is a program with no type-checking at all.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::unchecked</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">InterTypes::unchecked</span></span>:<br/><a href="3-idt.html#SP10">&#167;10</a>, <a href="3-idt.html#SP13">&#167;13</a>, <a href="3-idt.html#SP14">&#167;14</a>, <a href="3-idt.html#SP18_7">&#167;18.7</a>, <a href="3-idt.html#SP18_10">&#167;18.10</a>, <a href="3-idt.html#SP19">&#167;19</a>, <a href="3-idt.html#SP24">&#167;24</a><br/>The Instance Construct - <a href="4-tic2.html#SP4">&#167;4</a>, <a href="4-tic2.html#SP4_2">&#167;4.2</a><br/>The Package Construct - <a href="4-tpc.html#SP6">&#167;6</a><br/>The Property Construct - <a href="4-tpc6.html#SP4">&#167;4</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_constructor_code</span></a><span class="plain-syntax">(</span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::is_unchecked</span><button class="popup" onclick="togglePopup('usagePopup12')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup12">Usage of <span class="code-font"><span class="function-syntax">InterTypes::is_unchecked</span></span>:<br/>Inter in Text Files - <a href="3-iitf.html#SP13">&#167;13</a><br/>The Typename Construct - <a href="4-ttc.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">) == </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. </b>Access to the arity and operands depends on whether there's a typename or not:
only with a typename can we have an arity other than the default (e.g. a
<span class="extract"><span class="extract-syntax">FUNCTION_ITCONC</span></span> with arity 5) or operands other than <span class="extract"><span class="extract-syntax">unchecked</span></span>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::arity_is_possible</span><button class="popup" onclick="togglePopup('usagePopup13')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup13">Usage of <span class="code-font"><span class="function-syntax">InterTypes::arity_is_possible</span></span>:<br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> == (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">arity</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">TABLE_ITCONC</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">arity</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">FUNCTION_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">RULE_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">STRUCT_ITCONC</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> &lt;= (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">arity</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::type_arity</span><button class="popup" onclick="togglePopup('usagePopup14')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup14">Usage of <span class="code-font"><span class="function-syntax">InterTypes::type_arity</span></span>:<br/><a href="3-idt.html#SP21">&#167;21</a>, <a href="3-idt.html#SP23_4">&#167;23.4</a><br/>The Constant Construct - <a href="4-tcc2.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">type_name</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::type_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="4-ttc.html#SP7" class="function-link"><span class="function-syntax">TypenameInstruction::arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">)-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::type_operand</span><button class="popup" onclick="togglePopup('usagePopup15')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup15">Usage of <span class="code-font"><span class="function-syntax">InterTypes::type_operand</span></span>:<br/><a href="3-idt.html#SP21">&#167;21</a>, <a href="3-idt.html#SP23_4">&#167;23.4</a><br/>The Constant Construct - <a href="4-tcc2.html#SP5">&#167;5</a>, <a href="4-tcc2.html#SP6_4">&#167;6.4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">n</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">type_name</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::type_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="4-ttc.html#SP7" class="function-link"><span class="function-syntax">TypenameInstruction::operand_type</span></a><span class="plain-syntax">(</span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::type_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">), </span><span class="identifier-syntax">n</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP14" class="paragraph-anchor"></a><b>&#167;14. Converting inter_type to TID.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::from_TID</span><button class="popup" onclick="togglePopup('usagePopup16')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup16">Usage of <span class="code-font"><span class="function-syntax">InterTypes::from_TID</span></span>:<br/><a href="3-idt.html#SP19">&#167;19</a><br/>The Typename Construct - <a href="4-ttc.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">TID</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TID</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">SYMBOL_BASE_VAL</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_type_name</span></a><span class="plain-syntax">(</span><a href="2-st.html#SP13" class="function-link"><span class="function-syntax">InterSymbolsTable::symbol_from_ID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">TID</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">TID</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">TID</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::from_TID_in_field</span><button class="popup" onclick="togglePopup('usagePopup17')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup17">Usage of <span class="code-font"><span class="function-syntax">InterTypes::from_TID_in_field</span></span>:<br/><a href="3-idt.html#SP24">&#167;24</a><br/>Inter in Text Files - <a href="3-iitf.html#SP13">&#167;13</a><br/>The Constant Construct - <a href="4-tcc2.html#SP5">&#167;5</a><br/>The Variable Construct - <a href="4-tvc.html#SP3">&#167;3</a><br/>The Ref Construct - <a href="5-trc.html#SP3">&#167;3</a><br/>The Val Construct - <a href="5-tvc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP14" class="function-link"><span class="function-syntax">InterTypes::from_TID</span></a><span class="plain-syntax">(</span><a href="2-pck.html#SP10" class="function-link"><span class="function-syntax">InterPackage::scope</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::get_package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">)),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP15" class="paragraph-anchor"></a><b>&#167;15. Converting TID to inter_type.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::to_TID</span><button class="popup" onclick="togglePopup('usagePopup18')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup18">Usage of <span class="code-font"><span class="function-syntax">InterTypes::to_TID</span></span>:<br/><a href="3-idt.html#SP16">&#167;16</a><br/>The Constant Construct - <a href="4-tcc2.html#SP8">&#167;8</a><br/>The Package Construct - <a href="4-tpc.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-st.html#SP16" class="function-link"><span class="function-syntax">InterSymbolsTable::id_from_symbol_in_table</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">underlying_constructor</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::to_TID_at</span><button class="popup" onclick="togglePopup('usagePopup19')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup19">Usage of <span class="code-font"><span class="function-syntax">InterTypes::to_TID_at</span></span>:<br/>The Constant Construct - <a href="4-tcc2.html#SP2">&#167;2</a>, <a href="4-tcc2.html#SP4">&#167;4</a><br/>The Package Construct - <a href="4-tpc.html#SP4">&#167;4</a><br/>The Property Construct - <a href="4-tpc6.html#SP2">&#167;2</a><br/>The Variable Construct - <a href="4-tvc.html#SP2">&#167;2</a><br/>The Cast Construct - <a href="5-tcc.html#SP2">&#167;2</a><br/>The Local Construct - <a href="5-tlc3.html#SP2">&#167;2</a><br/>The Ref Construct - <a href="5-trc.html#SP2">&#167;2</a><br/>The Val Construct - <a href="5-tvc.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_bookmark</span><span class="plain-syntax"> *</span><span class="identifier-syntax">IBM</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-st.html#SP17" class="function-link"><span class="function-syntax">InterSymbolsTable::id_at_bookmark</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">IBM</span><span class="plain-syntax">, </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">underlying_constructor</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP16" class="paragraph-anchor"></a><b>&#167;16. Parsing from text.</b>The data structure <a href="3-idt.html#SP16" class="internal">inter_semisimple_type_description</a> exists as a way of
holding the results of the function <a href="3-idt.html#SP18" class="internal">InterTypes::parse_semisimple</a> &mdash; see
below. It's made convoluted by the remote but theoretical need to handle an
arbitrarily large number of type operands. No human user of Inter would ever
write a type exceeding about 10 operands, but we want to avoid any maxima in
Inter because it's primarily designed as a language for programs to write.
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">DEFAULT_SIZE_OF_ISSTD_OPERAND_ARRAY</span><span class="plain-syntax"> </span><span class="constant-syntax">32</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">constructor_code</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">capacity</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">default_operand_TIDs</span><span class="plain-syntax">[</span><span class="constant-syntax">DEFAULT_SIZE_OF_ISSTD_OPERAND_ARRAY</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> *</span><span class="identifier-syntax">operand_TIDs</span><span class="plain-syntax">;</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::initialise_isstd</span><button class="popup" onclick="togglePopup('usagePopup20')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup20">Usage of <span class="code-font"><span class="function-syntax">InterTypes::initialise_isstd</span></span>:<br/><a href="3-idt.html#SP19">&#167;19</a><br/>The Typename Construct - <a href="4-ttc.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> *</span><span class="identifier-syntax">results</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax"> = </span><span class="constant-syntax">DEFAULT_SIZE_OF_ISSTD_OPERAND_ARRAY</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax"> = </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">default_operand_TIDs</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::add_operand_to_isstd</span><button class="popup" onclick="togglePopup('usagePopup21')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup21">Usage of <span class="code-font"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></span>:<br/><a href="3-idt.html#SP18_1">&#167;18.1</a>, <a href="3-idt.html#SP18_2">&#167;18.2</a>, <a href="3-idt.html#SP18_3">&#167;18.3</a>, <a href="3-idt.html#SP18_4">&#167;18.4</a>, <a href="3-idt.html#SP18_5">&#167;18.5</a>, <a href="3-idt.html#SP18_6">&#167;18.6</a>, <a href="3-idt.html#SP18_7">&#167;18.7</a>, <a href="3-idt.html#SP18_8">&#167;18.8</a>, <a href="3-idt.html#SP18_9">&#167;18.9</a>, <a href="3-idt.html#SP18_10">&#167;18.10</a>, <a href="3-idt.html#SP18_12">&#167;18.12</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> *</span><span class="identifier-syntax">results</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">TID</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP15" class="function-link"><span class="function-syntax">InterTypes::to_TID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> &gt;= </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> *</span><span class="identifier-syntax">extended</span><span class="plain-syntax"> = (</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> *) </span><span class="identifier-syntax">Memory::calloc</span><span class="plain-syntax">(2*</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">, </span><span class="reserved-syntax">sizeof</span><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax">),</span>
<span class="plain-syntax">            </span><span class="constant-syntax">INTER_BYTECODE_MREASON</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;2*results-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">extended</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">];</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">extended</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP16_1" class="named-paragraph-link"><span class="named-paragraph">Free operand memory</span><span class="named-paragraph-number">16.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">*</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax"> = </span><span class="identifier-syntax">extended</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax">[(</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax">)++] = </span><span class="identifier-syntax">TID</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<ul class="endnotetexts"><li>The structure inter_semisimple_type_description is accessed in 4/ttc and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP17" class="paragraph-anchor"></a><b>&#167;17. </b>After a call to <a href="3-idt.html#SP18" class="internal">InterTypes::parse_semisimple</a> the following should be used
to dispose of the structure. Of course, almost always it does nothing, but it
prevents a memory leak if really large results were returned.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::dispose_of_isstd</span><button class="popup" onclick="togglePopup('usagePopup22')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup22">Usage of <span class="code-font"><span class="function-syntax">InterTypes::dispose_of_isstd</span></span>:<br/><a href="3-idt.html#SP19">&#167;19</a><br/>The Typename Construct - <a href="4-ttc.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> *</span><span class="identifier-syntax">results</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP16_1" class="named-paragraph-link"><span class="named-paragraph">Free operand memory</span><span class="named-paragraph-number">16.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP16_1" class="paragraph-anchor"></a><b>&#167;16.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Free operand memory</span><span class="named-paragraph-number">16.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">DEFAULT_SIZE_OF_ISSTD_OPERAND_ARRAY</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Memory::I7_array_free</span><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax">, </span><span class="constant-syntax">INTER_BYTECODE_MREASON</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capacity</span><span class="plain-syntax">, </span><span class="reserved-syntax">sizeof</span><span class="plain-syntax">(</span><span class="constant-syntax">inter_ti</span><span class="plain-syntax">));</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP16">&#167;16</a> and <a href="3-idt.html#SP17">&#167;17</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18" class="paragraph-anchor"></a><b>&#167;18. </b>Here goes, then:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::parse_semisimple</span><button class="popup" onclick="togglePopup('usagePopup23')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup23">Usage of <span class="code-font"><span class="function-syntax">InterTypes::parse_semisimple</span></span>:<br/><a href="3-idt.html#SP19">&#167;19</a><br/>The Typename Construct - <a href="4-ttc.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_error_location</span><span class="plain-syntax"> *</span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> *</span><span class="identifier-syntax">results</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>

<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_1" class="named-paragraph-link"><span class="named-paragraph">Parse rulebook syntax</span><span class="named-paragraph-number">18.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_2" class="named-paragraph-link"><span class="named-paragraph">Parse list syntax</span><span class="named-paragraph-number">18.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_3" class="named-paragraph-link"><span class="named-paragraph">Parse activity syntax</span><span class="named-paragraph-number">18.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_4" class="named-paragraph-link"><span class="named-paragraph">Parse column syntax</span><span class="named-paragraph-number">18.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_5" class="named-paragraph-link"><span class="named-paragraph">Parse table syntax</span><span class="named-paragraph-number">18.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_6" class="named-paragraph-link"><span class="named-paragraph">Parse description syntax</span><span class="named-paragraph-number">18.6</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_7" class="named-paragraph-link"><span class="named-paragraph">Parse relation syntax</span><span class="named-paragraph-number">18.7</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_8" class="named-paragraph-link"><span class="named-paragraph">Parse rule or function syntax</span><span class="named-paragraph-number">18.8</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_9" class="named-paragraph-link"><span class="named-paragraph">Parse struct syntax</span><span class="named-paragraph-number">18.9</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_10" class="named-paragraph-link"><span class="named-paragraph">Parse generic unary or binary syntax</span><span class="named-paragraph-number">18.10</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_11" class="named-paragraph-link"><span class="named-paragraph">Parse bare constructor-name syntax</span><span class="named-paragraph-number">18.11</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP18_12" class="named-paragraph-link"><span class="named-paragraph">Parse bare typename syntax</span><span class="named-paragraph-number">18.12</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-ie.html#SP4" class="function-link"><span class="function-syntax">InterErrors::quoted</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"no such data type"</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP18_1" class="paragraph-anchor"></a><b>&#167;18.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse rulebook syntax</span><span class="named-paragraph-number">18.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"rulebook of (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">RULEBOOK_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_2" class="paragraph-anchor"></a><b>&#167;18.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse list syntax</span><span class="named-paragraph-number">18.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"list of (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">LIST_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_3" class="paragraph-anchor"></a><b>&#167;18.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse activity syntax</span><span class="named-paragraph-number">18.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"activity on (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">ACTIVITY_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_4" class="paragraph-anchor"></a><b>&#167;18.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse column syntax</span><span class="named-paragraph-number">18.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"column of (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">COLUMN_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_5" class="paragraph-anchor"></a><b>&#167;18.5. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse table syntax</span><span class="named-paragraph-number">18.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"table of (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">TABLE_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_6" class="paragraph-anchor"></a><b>&#167;18.6. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse description syntax</span><span class="named-paragraph-number">18.6</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"description of (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">DESCRIPTION_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_7" class="paragraph-anchor"></a><b>&#167;18.7. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse relation syntax</span><span class="named-paragraph-number">18.7</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"relation of (%C+) to (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">RELATION_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">X_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">X_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">());</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_8" class="paragraph-anchor"></a><b>&#167;18.8. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse rule or function syntax</span><span class="named-paragraph-number">18.8</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(function) (%c+?) -&gt; (%c+)"</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(rule) (%c+?) -&gt; (%c+)"</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], </span><span class="identifier-syntax">I</span><span class="string-syntax">"function"</span><span class="plain-syntax">)) </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">FUNCTION_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">RULE_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1];</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">to</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[2];</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">from</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"void"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_constructor_code</span></a><span class="plain-syntax">(</span><span class="constant-syntax">VOID_ITCONC</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr3</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr3</span><span class="plain-syntax">, </span><span class="identifier-syntax">from</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *(%C+) *(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">arg_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr3</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">arg_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">E</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Str::copy</span><span class="plain-syntax">(</span><span class="identifier-syntax">from</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr3</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">to</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"void"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_constructor_code</span></a><span class="plain-syntax">(</span><span class="constant-syntax">VOID_ITCONC</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">res_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">to</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">E</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">res_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">returned_E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_9" class="paragraph-anchor"></a><b>&#167;18.9. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse struct syntax</span><span class="named-paragraph-number">18.9</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"struct (%c+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">STRUCT_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">elements</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0];</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr3</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr3</span><span class="plain-syntax">, </span><span class="identifier-syntax">elements</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *(%C+) *(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">arg_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr3</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">E</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="identifier-syntax">returned_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Str::copy</span><span class="plain-syntax">(</span><span class="identifier-syntax">elements</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr3</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">arg_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">returned_E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_10" class="paragraph-anchor"></a><b>&#167;18.10. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse generic unary or binary syntax</span><span class="named-paragraph-number">18.10</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"unary-cov (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">UNARY_COV_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"unary-con (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">UNARY_CON_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">conts_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"binary-cov-cov (%C+) and (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">BINARY_COV_COV_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">X_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">X_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">());</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"binary-cov-con (%C+) and (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">BINARY_COV_CON_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">X_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">X_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">());</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"binary-con-cov (%C+) and (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">BINARY_CON_COV_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">X_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">X_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">());</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"binary-con-con (%C+) and (%C+)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">BINARY_CON_CON_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">X_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">X_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP19" class="function-link"><span class="function-syntax">InterTypes::parse_simple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">Y_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">());</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_11" class="paragraph-anchor"></a><b>&#167;18.11. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse bare constructor-name syntax</span><span class="named-paragraph-number">18.11</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP6" class="function-link"><span class="function-syntax">InterTypes::constructor_from_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">VOID_ITCONC</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-ie.html#SP4" class="function-link"><span class="function-syntax">InterErrors::quoted</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"'void' cannot be used as a type"</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP18_12" class="paragraph-anchor"></a><b>&#167;18.12. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Parse bare typename syntax</span><span class="named-paragraph-number">18.12</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">typename_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::get_first_char</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">) == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">typename_s</span><span class="plain-syntax"> = </span><a href="2-st.html#SP20" class="function-link"><span class="function-syntax">InterSymbolsTable::wire_to_URL</span></a><span class="plain-syntax">(</span>
<span class="plain-syntax">            </span><a href="2-pck.html#SP4" class="function-link"><span class="function-syntax">InterPackage::tree</span></a><span class="plain-syntax">(</span><a href="2-st.html#SP3" class="function-link"><span class="function-syntax">InterSymbolsTable::package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">)), </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">typename_s</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-ie.html#SP4" class="function-link"><span class="function-syntax">InterErrors::quoted</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"no typename at this URL"</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">typename_s</span><span class="plain-syntax"> = </span><a href="3-iitf.html#SP5" class="function-link"><span class="function-syntax">TextualInter::find_symbol_in_table</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="constant-syntax">TYPENAME_IST</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">E</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">typename_s</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">results</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> = </span><span class="constant-syntax">EQUATED_ITCONC</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::add_operand_to_isstd</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">results</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_type_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">typename_s</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP18">&#167;18</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP19" class="paragraph-anchor"></a><b>&#167;19. </b>Sometimes we want to allow only a simple type, and if so then we can return
an <a href="3-idt.html#SP9" class="internal">inter_type</a>, which is less fuss. But we still write this as a wrapper
around the full <a href="3-idt.html#SP18" class="internal">InterTypes::parse_semisimple</a> so that it can produce a
useful error message in response to a semisimple but not simple piece of syntax.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::parse_simple</span><button class="popup" onclick="togglePopup('usagePopup24')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup24">Usage of <span class="code-font"><span class="function-syntax">InterTypes::parse_simple</span></span>:<br/><a href="3-idt.html#SP18_1">&#167;18.1</a>, <a href="3-idt.html#SP18_2">&#167;18.2</a>, <a href="3-idt.html#SP18_3">&#167;18.3</a>, <a href="3-idt.html#SP18_4">&#167;18.4</a>, <a href="3-idt.html#SP18_5">&#167;18.5</a>, <a href="3-idt.html#SP18_6">&#167;18.6</a>, <a href="3-idt.html#SP18_7">&#167;18.7</a>, <a href="3-idt.html#SP18_8">&#167;18.8</a>, <a href="3-idt.html#SP18_9">&#167;18.9</a>, <a href="3-idt.html#SP18_10">&#167;18.10</a><br/>The Constant Construct - <a href="4-tcc2.html#SP6_1">&#167;6.1</a><br/>The Instance Construct - <a href="4-tic2.html#SP4_1">&#167;4.1</a><br/>The Package Construct - <a href="4-tpc.html#SP6">&#167;6</a><br/>The Property Construct - <a href="4-tpc6.html#SP4">&#167;4</a><br/>The Variable Construct - <a href="4-tvc.html#SP4">&#167;4</a><br/>The Cast Construct - <a href="5-tcc.html#SP4">&#167;4</a><br/>The Local Construct - <a href="5-tlc3.html#SP4">&#167;4</a><br/>The Ref Construct - <a href="5-trc.html#SP4">&#167;4</a><br/>The Val Construct - <a href="5-tvc.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_error_location</span><span class="plain-syntax"> *</span><span class="identifier-syntax">eloc</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> **</span><span class="identifier-syntax">E</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_semisimple_type_description</span><span class="plain-syntax"> </span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP16" class="function-link"><span class="function-syntax">InterTypes::initialise_isstd</span></a><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        *</span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP18" class="function-link"><span class="function-syntax">InterTypes::parse_semisimple</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (*</span><span class="identifier-syntax">E</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">.</span><span class="element-syntax">constructor_code</span><span class="plain-syntax"> == </span><span class="constant-syntax">EQUATED_ITCONC</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP14" class="function-link"><span class="function-syntax">InterTypes::from_TID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">.</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax">[0]);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP17" class="function-link"><span class="function-syntax">InterTypes::dispose_of_isstd</span></a><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">over_complex</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">.</span><span class="element-syntax">arity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">.</span><span class="element-syntax">operand_TIDs</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] != </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">over_complex</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">over_complex</span><span class="plain-syntax">)  {</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP17" class="function-link"><span class="function-syntax">InterTypes::dispose_of_isstd</span></a><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            *</span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="3-ie.html#SP4" class="function-link"><span class="function-syntax">InterErrors::quoted</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"type too complex"</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">.</span><span class="element-syntax">constructor_code</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP17" class="function-link"><span class="function-syntax">InterTypes::dispose_of_isstd</span></a><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">parsed_description</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP20" class="paragraph-anchor"></a><b>&#167;20. Writing to text.</b>We offer two functions here so that it's possible to force a typename to print
its full definition out: otherwise printing the typename <span class="extract"><span class="extract-syntax">K_whatever</span></span> would
just print that name, <span class="extract"><span class="extract-syntax">K_whatever</span></span>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::write_type</span><button class="popup" onclick="togglePopup('usagePopup25')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup25">Usage of <span class="code-font"><span class="function-syntax">InterTypes::write_type</span></span>:<br/><a href="3-idt.html#SP21">&#167;21</a>, <a href="3-idt.html#SP23_5">&#167;23.5</a><br/>Inter in Text Files - <a href="3-iitf.html#SP13">&#167;13</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-st.html#SP18" class="function-link"><span class="function-syntax">InterSymbolsTable::write_symbol_URL</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">type</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="3-idt.html#SP21" class="function-link"><span class="function-syntax">InterTypes::write_type_longhand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::write_typename_definition</span><button class="popup" onclick="togglePopup('usagePopup26')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup26">Usage of <span class="code-font"><span class="function-syntax">InterTypes::write_typename_definition</span></span>:<br/>The Typename Construct - <a href="4-ttc.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP21" class="function-link"><span class="function-syntax">InterTypes::write_type_longhand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP10" class="function-link"><span class="function-syntax">InterTypes::from_type_name</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type_name</span><span class="plain-syntax">));</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP21" class="paragraph-anchor"></a><b>&#167;21. </b>Both of which use this:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::write_type_longhand</span><button class="popup" onclick="togglePopup('usagePopup27')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup27">Usage of <span class="code-font"><span class="function-syntax">InterTypes::write_type_longhand</span></span>:<br/><a href="3-idt.html#SP20">&#167;20</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_keyword</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">EQUATED_ITCONC:</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">DESCRIPTION_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">COLUMN_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RULEBOOK_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">LIST_ITCONC:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" of "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">ACTIVITY_ITCONC:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" on "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RELATION_ITCONC:</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" of "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" to "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FUNCTION_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">RULE_ITCONC:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">arity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="identifier-syntax">arity</span><span class="plain-syntax"> - </span><span class="constant-syntax">1</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"-&gt; "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">STRUCT_ITCONC:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">arity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNARY_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNARY_CON_ITCONC:</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_COV_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_CON_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_COV_CON_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_CON_CON_ITCONC:</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" and "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP22" class="paragraph-anchor"></a><b>&#167;22. Typechecking.</b>These are easy enough:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::is_enumerated</span><button class="popup" onclick="togglePopup('usagePopup28')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup28">Usage of <span class="code-font"><span class="function-syntax">InterTypes::is_enumerated</span></span>:<br/>The Instance Construct - <a href="4-tic2.html#SP3">&#167;3</a><br/>The Permission Construct - <a href="4-tpc3.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a>, <a href="4-ttc.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_enumerated</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::literal_is_in_range</span><button class="popup" onclick="togglePopup('usagePopup29')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup29">Usage of <span class="code-font"><span class="function-syntax">InterTypes::literal_is_in_range</span></span>:<br/>Inter in Text Files - <a href="3-iitf.html#SP12_2">&#167;12.2</a><br/>Inter Value Pairs - <a href="3-ivp.html#SP22_1">&#167;22.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">min_value</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">max_value</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>


<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::unsigned_literal_is_in_range</span><button class="popup" onclick="togglePopup('usagePopup30')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup30">Usage of <span class="code-font"><span class="function-syntax">InterTypes::unsigned_literal_is_in_range</span></span>:<br/>Inter in Text Files - <a href="3-iitf.html#SP12_2">&#167;12.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">long</span><span class="plain-syntax"> </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">max_value</span><span class="plain-syntax"> - </span><span class="identifier-syntax">itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">min_value</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP23" class="paragraph-anchor"></a><b>&#167;23. </b>This is what matters: whether we allow a value of type <span class="extract"><span class="extract-syntax">A</span></span> to be used where
a value of type <span class="extract"><span class="extract-syntax">B</span></span> is expected.
</p>

<p class="commentary">Anything can be used as <span class="extract"><span class="extract-syntax">unchecked</span></span>, and <span class="extract"><span class="extract-syntax">unchecked</span></span> can be used as anything.
</p>

<p class="commentary">Otherwise, they must both be base types, or both constructed: and then we
split into four cases as to whether they are the same or different.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">InterTypes::can_be_used_as</span><button class="popup" onclick="togglePopup('usagePopup31')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup31">Usage of <span class="code-font"><span class="function-syntax">InterTypes::can_be_used_as</span></span>:<br/><a href="3-idt.html#SP23_4">&#167;23.4</a><br/>Inter in Text Files - <a href="3-iitf.html#SP12_14_1">&#167;12.14.1</a><br/>Inter Value Pairs - <a href="3-ivp.html#SP22_2">&#167;22.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">A</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">B</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_error_location</span><span class="plain-syntax"> *</span><span class="identifier-syntax">eloc</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_type_constructor</span><span class="plain-syntax"> *</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP11" class="function-link"><span class="function-syntax">InterTypes::constructor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">B</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">UNCHECKED_ITCONC</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_base</span><span class="plain-syntax"> != </span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_base</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">is_base</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> != </span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_1" class="named-paragraph-link"><span class="named-paragraph">Different base</span><span class="named-paragraph-number">23.1</span></a></span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_2" class="named-paragraph-link"><span class="named-paragraph">Same base</span><span class="named-paragraph-number">23.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> != </span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_3" class="named-paragraph-link"><span class="named-paragraph">Different proper constructor</span><span class="named-paragraph-number">23.3</span></a></span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_4" class="named-paragraph-link"><span class="named-paragraph">Same proper constructor</span><span class="named-paragraph-number">23.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP23_1" class="paragraph-anchor"></a><b>&#167;23.1. </b>This expresses that <span class="extract"><span class="extract-syntax">int2 &lt;= int8 &lt;= int16 &lt;= int32</span></span>.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Different base</span><span class="named-paragraph-number">23.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INT2_ITCONC:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT8_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT16_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT32_ITCONC</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INT8_ITCONC:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT16_ITCONC</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT32_ITCONC</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">INT16_ITCONC:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">B_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">INT32_ITCONC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP23">&#167;23</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP23_2" class="paragraph-anchor"></a><b>&#167;23.2. </b>Enumerated types, if named, can be declared as subtypes of each other. This
is used by Inform to make the enumerated type for "vehicle" a subtype of the
enumerated type for "thing", for example.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Same base</span><span class="named-paragraph-number">23.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">ENUM_ITCONC</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">typenameB_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">B</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">typenameA_s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">A</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">typenameB_s</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">typenameA_s</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="4-ttc.html#SP10" class="function-link"><span class="function-syntax">TypenameInstruction::is_a</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">typenameA_s</span><span class="plain-syntax">, </span><span class="identifier-syntax">typenameB_s</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP23">&#167;23</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP23_3" class="paragraph-anchor"></a><b>&#167;23.3. </b>Different proper constructors never match.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Different proper constructor</span><span class="named-paragraph-number">23.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP23">&#167;23</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP23_4" class="paragraph-anchor"></a><b>&#167;23.4. </b>If the same proper constructor is used, the question is then whether the
operands match. For example, <span class="extract"><span class="extract-syntax">list of int2</span></span> can be used as <span class="extract"><span class="extract-syntax">list of int32</span></span>
but not vice versa: that's a covariant operand. But <span class="extract"><span class="extract-syntax">function int2 -&gt; text</span></span>
cannot be used as <span class="extract"><span class="extract-syntax">function int32 -&gt; text</span></span>, it's the other way around: that
is an example of contravariance. In the simple type system of Inter, only
function arguments are contravariant.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Same proper constructor</span><span class="named-paragraph-number">23.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="identifier-syntax">operand_E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">STRUCT_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FUNCTION_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNARY_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">UNARY_CON_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_COV_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_COV_CON_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_CON_COV_ITCONC:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">BINARY_CON_CON_ITCONC:</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">typename_A</span><span class="plain-syntax"> = </span><span class="identifier-syntax">A</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">typename_B</span><span class="plain-syntax"> = </span><span class="identifier-syntax">B</span><span class="plain-syntax">.</span><span class="element-syntax">type_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">typename_A</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">typename_B</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">) != </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">B</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                    </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_arity</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">arity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">FUNCTION_ITCONC</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">arity</span><span class="plain-syntax">-1))</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">UNARY_CON_ITCONC</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">BINARY_CON_COV_ITCONC</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">BINARY_COV_CON_ITCONC</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">A_itc</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">constructor_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">BINARY_CON_CON_ITCONC</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">covariant</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">covariant</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">operand_E</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP23" class="function-link"><span class="function-syntax">InterTypes::can_be_used_as</span></a><span class="plain-syntax">(</span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">),</span>
<span class="plain-syntax">                            </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">B</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">), </span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">operand_E</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP23" class="function-link"><span class="function-syntax">InterTypes::can_be_used_as</span></a><span class="plain-syntax">(</span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">B</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">),</span>
<span class="plain-syntax">                            </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">), </span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operand_E</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">default:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;A_itc-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">operand_E</span><span class="plain-syntax"> = </span><a href="3-idt.html#SP23" class="function-link"><span class="function-syntax">InterTypes::can_be_used_as</span></a><span class="plain-syntax">(</span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">A</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">),</span>
<span class="plain-syntax">                    </span><a href="3-idt.html#SP13" class="function-link"><span class="function-syntax">InterTypes::type_operand</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">B</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">), </span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">operand_E</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-idt.html#SP23_5" class="named-paragraph-link"><span class="named-paragraph">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP23">&#167;23</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP23_5" class="paragraph-anchor"></a><b>&#167;23.5. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Throw type mismatch error</span><span class="named-paragraph-number">23.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">err</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="string-syntax">"value '%S' has type "</span><span class="plain-syntax">, </span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="identifier-syntax">A</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="string-syntax">" which is not a "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-idt.html#SP20" class="function-link"><span class="function-syntax">InterTypes::write_type</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="identifier-syntax">B</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-ie.html#SP4" class="function-link"><span class="function-syntax">InterErrors::plain</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="identifier-syntax">eloc</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-idt.html#SP23">&#167;23</a>, <a href="3-idt.html#SP23_1">&#167;23.1</a>, <a href="3-idt.html#SP23_2">&#167;23.2</a>, <a href="3-idt.html#SP23_3">&#167;23.3</a> and <a href="3-idt.html#SP23_4">&#167;23.4</a> (three times).</li></ul>
<p class="commentary firstcommentary"><a id="SP24" class="paragraph-anchor"></a><b>&#167;24. The type of a defined symbol.</b>Note that a typename can be used as a value, and that if so, its type is <span class="extract"><span class="extract-syntax">unchecked</span></span>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::of_symbol</span><button class="popup" onclick="togglePopup('usagePopup32')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup32">Usage of <span class="code-font"><span class="function-syntax">InterTypes::of_symbol</span></span>:<br/>Inter in Text Files - <a href="3-iitf.html#SP12_14_1">&#167;12.14.1</a><br/>Inter Value Pairs - <a href="3-ivp.html#SP22_2">&#167;22.2</a><br/>The Instance Construct - <a href="4-tic2.html#SP6">&#167;6</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">symb</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">symb</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">D</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_construct</span><span class="plain-syntax"> *</span><span class="identifier-syntax">IC</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-ic.html#SP14" class="function-link"><span class="function-syntax">InterInstruction::get_construct</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">IC</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">TID_field</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP14" class="function-link"><span class="function-syntax">InterTypes::from_TID_in_field</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">TID_field</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-idt.html#SP12" class="function-link"><span class="function-syntax">InterTypes::unchecked</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">InterTypes::expresses_value</span><button class="popup" onclick="togglePopup('usagePopup33')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup33">Usage of <span class="code-font"><span class="function-syntax">InterTypes::expresses_value</span></span>:<br/>Inter Value Pairs - <a href="3-ivp.html#SP22_2">&#167;22.2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">symb</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">symb</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">D</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_construct</span><span class="plain-syntax"> *</span><span class="identifier-syntax">IC</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-ic.html#SP14" class="function-link"><span class="function-syntax">InterInstruction::get_construct</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">IC</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">construct_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">TYPENAME_IST</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">TID_field</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-ivp.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-bm.html">1</a></li><li class="progresschapter"><a href="2-it.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-ic.html">ic</a></li><li class="progresssection"><a href="3-iibf.html">iibf</a></li><li class="progresssection"><a href="3-iitf.html">iitf</a></li><li class="progresssection"><a href="3-vi.html">vi</a></li><li class="progresssection"><a href="3-ivp.html">ivp</a></li><li class="progresscurrent">idt</li><li class="progresssection"><a href="3-mtd.html">mtd</a></li><li class="progresssection"><a href="3-ie.html">ie</a></li><li class="progresssection"><a href="3-tp.html">tp</a></li><li class="progresschapter"><a href="4-tcc.html">4</a></li><li class="progresschapter"><a href="5-tac.html">5</a></li><li class="progresschapter"><a href="6-tpc.html">6</a></li><li class="progressnext"><a href="3-mtd.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

